package com.diandi.ddsb.bean;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.Properties;

public class SystemConstant {
	private static Logger logger = LoggerFactory.getLogger(SystemConstant.class);
	// -------正式环境
	// 自有准备金账户:这个走服务费 红包 平衡金等各种
	// public static final String TEADE_ACCOUNT="200800500120001133659600001";
	// 自有准备金账户id
	// public static final long TEADE_ACCOUNT_ID=1;

	// -------测试环境

	// 系统垫付，逾期还款系统账户、
	// 正式的环境
	// public static final String SYS_OVERDUE_ACCOUNT="117";//1
	// public static final long SYS_OVERDUE_ACCOUNT_ID=117L;

	// 对公保证金账户:委托代扣保证金
	// public static final Long SYSTEM_TEADE_USER =1L;

	public static final double FINAL_DOUBLE_ZERO = 0.00;

	public static final int FINAL_INT_ZERO = 0;
	public static final int FINAL_INT_ONE = 1;
	public static final int FINAL_INT_TWO = 2;
	public static final int FINAL_INT_THREE = 3;

	public static final String FINAL_STR_ZERO = "0";
	public static final String FINAL_STR_ONE = "1";
	public static final String FINAL_STR_N = "N";
	public static final String FINAL_STR_Y = "Y";

	public static final String FINAL_STR_20023 = "20023";

	public static final String FINAL_STR_TWO = "2";
	public static final String FINAL_STR_THREE = "3";
	public static final String FINAL_STR_FOUR = "4";

	/**
	 * //对公基本账户:手续费 public static final String
	 * POUNDAGE_ACCOUNT="200100100120001133659600001";
	 * 
	 * //对公保证金账户:委托代扣保证金 public static final String MARGIN_ACCOUNT
	 * ="200100100320001133659600001";
	 **/
	/*// 对公保证金账户:委托代扣保证金
	public static String MARGIN_ACCOUNT = "ceshishanghuhao";*/

	// 测试的环境
	// public static String SYS_OVERDUE_ACCOUNT="117";//1
	// public static long SYS_OVERDUE_ACCOUNT_ID=117L;



	// 标的文档存储主路径
	public static String BORROW_DOCMENT_PATH = "BORROW_DOCMENT_PATH";
	// 借款用户示例图片存储主路径
	public static String BORROW_PURPOSE_PATH = "borrowPur";
	// 用户文档存储主路径
	public static String USER_DOCMENT_PATH = "USER_DOCMENT_PATH";
	
	// 用户头像存储主路径
	public static String USER_DOCMENT_PICTURE_PATH = "USER_DOCMENT_PICTURE_PATH";
	// 用户文档存储主路径
	public static String COOPERATION_DOCMENT_PATH = "COOPERATION_DOCMENT_PATH";
	// 用户大额提现身份证存储路径
	public static String IDCARD_DOCMENT_PATH = "";
	// FTP路径
	public static String FTP_PATH = "";
	// 测试
	public static String IS_DEBUG = "-1";
	// 发邮件logo
	public static String EMAIL_LOGO = "";

	// 发邮件回调url
	public static String EMAIL_CALLBACK_URL = "EMAIL_CALLBACK_URL";

	// 注册地址 （生成邀请链接）
	public static String REGISTER_URL = "";

	// 本地临时存储文件路径
	public static String LOCAL_TEMP_STORE_PATH = "/data/tmp/";
	
	public static String MJ_IDCARDS_SAVE_PATH = "/data/idCardFiles/";
	
	// 缩小文件前缀
	public static String SCALING_MINI_FILE_PRE = "SCALING_MINI_FILE_PRE";
	// 缩小文件
	public static int SCALING_MINI_FILE_WIDTH = 160;
	// 缩小文件
	public static int SCALING_MINI_FILE_HEIGHT = 125;

	// 充值费率
	public static final Double DEPOSIT_rate = 0.025;

	// 提现2块
	public static final Double WITHDRAW = 2.00;

	// 取现审批金额上限
	public static Double WITHDRAW_UPPER_LIMIT_AMT = 10000.00;

	public static BigDecimal WITHDRAW_FASTER_LIMIT = new BigDecimal("30000");
	// 推荐URL
	public static String RECOMMEND_URL = "";

	// 邀请活动
	public static String WEIXIN_PARAM = "";
	public static String QQ_PARAM = "";
	public static String SINA_PARAM = "";
	public static String TENCENT_PARAM = "";
	public static String SENDMSG_PARAM = "";
	public static String COPY_PARAM = "";
	public static String H5_PARAM = "";



	// 秒合同借款用户名
	public static String MJ_LOAN_USER_NAME = "臧成都";
	// 秒合同借款用户平台用户名
	public static String MJ_LOAN_SYS_USER_NAME = "semllking";
	// 秒借 常量 ---start
	// 秒借放款、还款中间账户
	public static Long LOAN_ACCOUNT_ID = -1L;
	public static final long MJ_TRADE2_ACCOUNT_ID = 2L;

	/**
	 * cms url ，用于页面图片拼接访问路径
	 */
	public static String CMS_URL = "";
	/**
	 * cms url ，测试用，主要是测试环境拼接访问路径
	 */
	public static String CMS_TEST_URL = "";

	public static String WITHDRAW_TEADE_ACCOUNT = "sinaweibopay_b2c@weibopay.com";// 1
	public static String WITHDRAW_PARTNER_ID = "200004265447 ";

	public static String TRADE_COLOSE_TIME = "5m";

	/**
	 * 油分期常量设置
	 */
	public static String GAS_DIRECT_FILL_LIMIT = "GAS_DIRECT_FILL_LIMIT";
	public static String GAS_ARBITRARILY_FILL_LIMIT = "GAS_ARBITRARILY_FILL_LIMIT";
	static {
		try {
			InputStream inputStream = SystemConstant.class.getClassLoader().getResourceAsStream(
					"systemconstant.properties");
			Properties properties = new Properties();
			properties.load(inputStream);
			IS_DEBUG = properties.getProperty("debug");
			COOPERATION_DOCMENT_PATH = properties.getProperty("COOPERATION_DOCMENT_PATH");
		} catch (FileNotFoundException e) {
			logger.error("文件不存在！sms.properties");
		} catch (IOException e) {
			logger.error("文件sms.properties，读取错误");
		} catch (Exception e) {
			logger.error("获取属性异常：{}", e.getMessage());
		}
	}

}
